package com.dhu6016.wiki_information_store.controller;

import com.dhu6016.wiki_information_store.domain.Test;
import com.dhu6016.wiki_information_store.service.TestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2022-04-29-14:55
 */
@RestController
public class TestController {

    @Resource
    private TestService testService;

    @RequestMapping("/hello")
    public String hello(){
        return "start Engine Today";
    }

    @GetMapping("/test/list")
    public List<Test> list(){
        return testService.list();
    }

}
